<template>
  <Layout :class="prefixCls" v-bind="lockEvents" >
    <LayoutFeatures />
    <LayoutHeader fixed v-if="getShowFullHeaderRef" />
    <Layout :class="[layoutClass]" style="background: #444;">
      <LayoutSideBar v-if="getShowSidebar || getIsMobile" />
      <Layout :class="`${prefixCls}-main`">
        <LayoutMultipleHeader />
        <LayoutContent />
        <LayoutFooter />
      </Layout>
    </Layout>
  </Layout>
</template>

<script lang="ts">
  import { defineComponent, computed, unref } from 'vue';
  import { Layout } from 'ant-design-vue';
  import { createAsyncComponent } from '/@/utils/factory/createAsyncComponent';

  import LayoutHeader from './header/index.vue';
  import LayoutContent from './content/index.vue';
  import LayoutSideBar from './sider/index.vue';
  import LayoutMultipleHeader from './header/MultipleHeader.vue';

  import { useHeaderSetting } from '/@/hooks/setting/useHeaderSetting';
  import { useMenuSetting } from '/@/hooks/setting/useMenuSetting';
  import { useDesign } from '/@/hooks/web/useDesign';
  import { useLockPage } from '/@/hooks/web/useLockPage';

  import { useAppInject } from '/@/hooks/web/useAppInject';

  export default defineComponent({
    name: 'DefaultLayout',
    components: {
      LayoutFeatures: createAsyncComponent(() => import('/@/layouts/default/feature/index.vue')),
      LayoutFooter: createAsyncComponent(() => import('/@/layouts/default/footer/index.vue')),
      LayoutHeader,
      LayoutContent,
      LayoutSideBar,
      LayoutMultipleHeader,
      Layout,
    },
    setup() {
      const { prefixCls } = useDesign('default-layout');
      const { getIsMobile } = useAppInject();
      const { getShowFullHeaderRef } = useHeaderSetting();
      const { getShowSidebar, getIsMixSidebar, getShowMenu } = useMenuSetting();

      // Create a lock screen monitor
      const lockEvents = useLockPage();

      const layoutClass = computed(() => {
        let cls: string[] = ['ant-layout'];
        if (unref(getIsMixSidebar) || unref(getShowMenu)) {
          cls.push('ant-layout-has-sider');
        }
        return cls;
      });

      return {
        getShowFullHeaderRef,
        getShowSidebar,
        prefixCls,
        getIsMobile,
        getIsMixSidebar,
        layoutClass,
        lockEvents,
      };
    },
  });
</script>
<style lang="less">
  @prefix-cls: ~'@{namespace}-default-layout';

  .@{prefix-cls} {
    display: flex;
    width: 100%;
    min-height: 100%;
    background-color: @content-bg;
    flex-direction: column;

    > .ant-layout {
      min-height: 100%;
    }

    &-main {
      width: 100%;
      margin-left: 1px;
    }
  }
  
  .vben-default-layout{
  background: #444 !important;
  background:url("/@/assets/images/bc2.png") no-repeat  !important;
  background-size: 100%;
  height: 100%;
}
.ant-layout{
  background: #444 !important;
}
.vben-layout-content{
  height: 100% !important;
}
.vben-layout-sideBar.ant-layout-sider-dark{
  background: #2A2B2D !important;
}
.vben-menu-dark.vben-menu-vertical .vben-simple-menu__parent .vben-menu-dark.vben-menu-vertical .vben-menu-submenu-title{
  background: #2A2B2D !important;
}
.ant-page-header{
  background: #222222 !important;
  color: #fff !important;
}
h1, h2, h3, h4, h5, h6{
  color: #fff !important;
}
html[data-theme='light'] .text-secondary{
  color: #fff !important;
}
.vben-layout-header--light{
  background: #000 !important;
  .vben-layout-header-left .vben-layout-header-trigger.light svg{
    fill: #fff !important;
  }
}
.ant-card{
  background: #2A2B2D !important;
  color: #fff !important;
}
.ant-card-bordered{
  border: 1px solid #797979 !important;
}
.vben-multiple-tabs,.vben-multiple-tabs .ant-tabs.ant-tabs-card .ant-tabs-card-bar{
  background: #2A2B2D !important;
  color: #fff !important;
  
}
.vben-multiple-tabs-content__extra-quick, .vben-multiple-tabs-content__extra-redo, .vben-multiple-tabs-content__extra-fold,.vben-layout-header--light .vben-layout-header-action__item,.vben-header-user-dropdown--light .vben-header-user-dropdown__name{
  color: #fff !important;
}
.vben-layout-header--light .vben-layout-header-action-icon, .vben-layout-header--light .vben-layout-header-action span[role='img']{
  color: #fff !important;
}
.ant-tooltip-open{
  color: #0960bd ;
}
.vben-layout-header--light .vben-layout-header-action__item:hover{background-color:#0960bd !important;}
.vben-layout-header-left .vben-layout-header-trigger.light:hover{background-color:#0960bd !important;}
.vben-layout-header--light .vben-layout-header-logo:hover{background-color:#0960bd !important;}
.vben-header-user-dropdown--light:hover{background-color:#0960bd !important;}
.custom-container{
  background: none !important;;
}
.ant-spin-container .ant-table{
  background: #494D50 !important;
  color: #fff !important;
 
}
.ant-table-striped :deep(.table-striped) td {
  background-color: #373737 !important;
}
.table-striped,.ant-table-striped .table-striped td{
  background-color: #373737 !important;
}
.ant-table-striped :deep(.table-default) td {
  background-color: #494D50 !important;
}
.table-default,.ant-table-striped .table-default td{
  background-color: #494D50 !important;
}
.ant-table-thead > tr > th{
  background-color: #373737 !important;
  color: #fff !important;
}
.tb1{
  background: #2A2B2D !important;
  color: #fff !important;
}
.ant-form-item-label > label{
  color: #fff !important;
}
.ant-tabs.ant-tabs-card .ant-tabs-card-bar .ant-tabs-tab-active{
  background-color: #0960bd !important;
  color: #fff !important;
}
.ant-input{
  background:#3B3D3E ;
}
.ant-select:not(.ant-select-customize-input) .ant-select-selector{
  background:#3B3D3E !important;
}
input::input-placeholder{
  color: #fff !important;
}
::placeholder {
  color: #fff !important;
}
.ant-select-selection-placeholder{
  color: #fff !important;
}
.ant-select-arrow{
  color: #fff !important;
}
.vben-multiple-tabs .ant-tabs.ant-tabs-card .ant-tabs-card-bar .ant-tabs-tab{
  background: none !important;;
  color: #fff;
}
.ant-tabs-tab-active{
  background: #0960bd !important;;
}
.vben-layout-header--light{
  border-left: none;
}




/*
.vben-default-layout{

  margin: 0 auto;
  width: 100%;
  background: none;
  background:url("/@/assets/images/bc2.png") no-repeat  !important;
  background-size:contain;
  height: 100%;
}

.vben-default-layout-main{
  background: none !important;
}
.vben-layout-sideBar.ant-layout-sider-dark{
  background: none !important;
}
.ant-layout-has-sider{
  background: none !important;
}
.vben-menu-dark.vben-menu-vertical .vben-simple-menu__parent{
  background: none !important;
}
.solde_box{
  background: none !important;
}
.ant-page-header{
  background: none !important;
  color: #fff !important;
}
h1, h2, h3, h4, h5, h6{
  color: #fff !important;
}
html[data-theme='light'] .text-secondary{
  color: #fff !important;
}
.vben-layout-header--light{
  background: none !important;
}
.ant-card{
  background: none !important;
  color: #fff !important;
}
.ant-card-bordered{
  border: 1px solid #797979 !important;
}
.vben-multiple-tabs,.vben-multiple-tabs .ant-tabs.ant-tabs-card .ant-tabs-card-bar{
  background: none !important;
  color: #fff !important;
  
}
.vben-multiple-tabs-content__extra-quick, .vben-multiple-tabs-content__extra-redo, .vben-multiple-tabs-content__extra-fold,.vben-layout-header--light .vben-layout-header-action__item,.vben-header-user-dropdown--light .vben-header-user-dropdown__name{
  color: #fff !important;
}
.vben-layout-header--light .vben-layout-header-action-icon, .vben-layout-header--light .vben-layout-header-action span[role='img']{
  color: #fff !important;
}
.ant-tooltip-open{
  color: #0960bd ;
}
.vben-layout-header--light .vben-layout-header-action__item:hover{background-color:#0960bd !important;}
.vben-layout-header-left .vben-layout-header-trigger.light:hover{background-color:#0960bd !important;}
.vben-layout-header--light .vben-layout-header-logo:hover{background-color:#0960bd !important;}
.vben-header-user-dropdown--light:hover{background-color:#0960bd !important;}
.custom-container{
  background: none !important;;
}
.ant-spin-container .ant-table{
  background: #494D50 !important;
  color: #fff !important;
 
}
.ant-table-striped :deep(.table-striped) td {
  background-color: #373737 !important;
}
.table-striped,.ant-table-striped .table-striped td{
  background-color: #373737 !important;
}
.ant-table-thead > tr > th{
  background-color: #373737 !important;
  color: #fff !important;
}
.tb1{
  background: #2A2B2D !important;
  color: #fff !important;
}
.ant-form-item-label > label{
  color: #fff !important;
}
.ant-tabs.ant-tabs-card .ant-tabs-card-bar .ant-tabs-tab-active{
  background-color: #0960bd !important;
  color: #fff !important;
}*/
</style>
